
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import TaskTaskdetailBase from './taskdetail-portlet-base.vue';
import TaskService from "@service/task/task-service";
import SysEmployeeServiceBase from "@service/sys-employee/sys-employee-service-base";

 
@Component({
    components: {
         
    }
})
export default class TaskTaskdetail extends TaskTaskdetailBase {

    /**
     * 执行created后的逻辑
     *
     *  @memberof TaskdetailBase
     */
    public afterCreated(){
        if (this.viewState) {
            this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
                if(Object.is(tag, "all-portlet") && Object.is(action,'loadmodel')){
                    this.calcUIActionAuthState(data);
                }
                if (!Object.is(tag, this.name)) {
                    return;
                }
                const refs: any = this.$refs;
                Object.keys(refs).forEach((_name: string) => {
                    this.viewState.next({ tag: _name, action: action, data: data });
                });
                if(Object.is(action, 'refreshDetail')){
                    let appTaskdetail: any = this.$refs.appTaskdetail;
                    if(appTaskdetail ){
                        appTaskdetail.searchTaskByTaskId(data);
                    }
                }

            });
        }
    }

}
</script>
